<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        
    </style>
</head>
<body>
    
</body>
<script>

    // console.log(document.cookie);

    // document.cookie = "name=admin";
    
    // const d = new Date()
    // d.setDate(d.getDate()+3);
    // document.cookie = "age=18;expires=" + d;

    // document.cookie = "abc=hello;path=/code/day23"

    // http://127.0.0.1:5500/code/day24/2cookie%E7%9A%84%E4%BD%BF%E7%94%A8.html

    // document.cookie = "age=19";

    // const d = new Date();
    // d.setDate(d.getDate()-1);
    // document.cookie = "sex=19;expires=" + d + ";path=/code";



    // 会话级默认路径的cookie
    // document.cookie = "name=admin";

    // 指定路径的cookie
    // document.cookie = "a=10;path=/"
    // document.cookie = "b=20;path=/code"
    // document.cookie = "c=30;path=/code/day23"

    // 指定有效期的cookie
    // const d = new Date();
    // d.setDate(d.getDate()+3);
    // document.cookie = "d=40;expires="+d;

    // 指定路径和有效期的cookie
    // const d = new Date();
    // d.setDate(d.getDate()+7);
    // document.cookie = "e=50;path=/code;expires=" + d;

    // 修改当前路径的cookie
    // document.cookie = "name=root;";

    // 修改指定路径的cookie
    // document.cookie = "e=60;path=/code";

    // 删除其实就是修改有效期，有效期设置为过去的日期，就是删除

    
</script>
</html>